//
//  ParameterCell.m
//  ShrimpCrowdordering
//
//  Created by 骆锴 on 2018/8/30.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "ParameterCell.h"

@interface ParameterCell()

@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *parameterLabel;

@end

@implementation ParameterCell

+ (ParameterCell *)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellID = @"parameterCell";
    ParameterCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (cell == nil) {
        cell = [[ParameterCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.backgroundColor = [UIColor whiteColor];
        [cell createSubView];
    }
    return cell;
}

-(void)createSubView{
    _titleLabel =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(16), ScreenX375(18), ScreenX375(100), ScreenX375(14))];
    _titleLabel.text = @"款式：";
    _titleLabel.font = Kfont(14);
    _titleLabel.textColor = REXADECIMALCOLOR(@"#333333");
    _titleLabel.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_titleLabel];
    
    _parameterLabel =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(200), ScreenX375(18), ScreenX375(159), ScreenX375(14))];
    _parameterLabel.text = @"款式：";
    _parameterLabel.font = Kfont(14);
    _parameterLabel.textColor = REXADECIMALCOLOR(@"#333333");
    _parameterLabel.textAlignment = NSTextAlignmentRight;
    [self addSubview:_parameterLabel];
    
    UIView *line = [[UIView alloc] initWithFrame:CGRectMake(ScreenX375(16), ScreenX375(54.5), ScreenX375(343), ScreenX375(0.5))];
    line.backgroundColor = LineColor;
    [self addSubview:line];
}

-(void)setTitleLabelText:(NSString *)titleLabel{
    _titleLabel.text = titleLabel;
}

-(void)setParameterLabelText:(NSString *)parameterLabel{
    _parameterLabel.text = parameterLabel;
}

@end
